package com.gouzheng.dao;

import com.gouzheng.entity.Answerinfo;
import com.gouzheng.entity.Paper;
import com.gouzheng.entity.Topic;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface paperDao {

    //查询全部考卷
    List<Paper> getPaperAll(String paperName);

    //查询全部考题
    List<Topic> getTopic(Integer paperId);

    //查询上线的考卷
    List<Paper> getStu(Integer deleteFlag);

    //添加考卷
    void addPaper(Paper paper);

    //根据试卷查询试题
    Topic selectTopic(@Param("paperId")Integer paperId,@Param("titleNumber")Integer titleNumber);

    //编辑考题
    void updateTopic(Topic topic);

    //增加考题
    void addTopic(Topic topic);

    //查询题数
    Integer findCountTopic(Integer paperId);

    //根据id查询
    Paper findId(Integer paperId);

    //上线下线
    void linePaper(@Param("deleteFlag") Integer deleteFla,@Param("paperId") Integer paperId);

//    //删除考卷
//    void deletePaper(Integer paperId);

    //答题
    void addAnswerInfo(Answerinfo answerinfo);

    //删除考题
    void deleteTopic(@Param("paperId") Integer paperId,@Param("titleNumber")Integer titleNumber);





}
